package cn.edu.hbwe.book.service.notice;

import java.util.List;

import cn.edu.hbwe.book.dao.impl.NoticeDaoImpl;
import cn.edu.hbwe.book.entity.Notice;

public class NoticeService {
	public List<Notice> getAllNotices() {
		NoticeDaoImpl nd=new NoticeDaoImpl();
		return nd.getAllNotices();
	}
	public  List<Notice> findAll() {
		NoticeDaoImpl nd=new NoticeDaoImpl();
		return nd.findAll();
	}
	public  void addNotice(Notice n) {	
		NoticeDaoImpl nd=new NoticeDaoImpl();
		nd.addNotice(n);
	}
	public  Notice findNotice(String id)  {
		NoticeDaoImpl nd=new NoticeDaoImpl();
		return nd.findNotice(id);
	}
	public  void updateNotice(Notice n)  {
		NoticeDaoImpl nd=new NoticeDaoImpl();
		nd.updateNotice(n);
	}
	public  void deleteNotice(String n_id) {
		NoticeDaoImpl nd=new NoticeDaoImpl();
		nd.deleteNotice(n_id);
	}
	public Notice getRecentNotice()  {
		NoticeDaoImpl nd=new NoticeDaoImpl();
		return nd.getRecentNotice();
	}
}
